Skip to content

fix: Fix empty Colors section in Theme Switcher (#4)#67

Open
sonikadeshwal wants to merge 1 commit into
revatikadam0607:mainfrom
sonikadeshwal:main
Open

fix: Fix empty Colors section in Theme Switcher (#4)#67
sonikadeshwal wants to merge 1 commit into
revatikadam0607:mainfrom
sonikadeshwal:main

Conversation

@sonikadeshwal

Copy link
Copy Markdown

Summary

Fixes #4 — The Colors section in the theme switcher was visible but displayed no color options.

Root Cause

The color swatch elements, their styles, and the JavaScript logic to apply accent colors were missing.

Changes Made

  • index.html — Added 6 color dot swatches (Purple, Cyan, Red, Green, Orange, Pink) inside the Colors section
  • css/style.css — Added styles for .color-dot, .color-options, and .active state
  • js/script.js — Added setAccentColor() function that updates the CSS variable --accent-color and persists selection to localStorage

Behavior After Fix

  • Color swatches are visible and clickable
  • Selected color is highlighted with an active ring
  • Chosen color persists on page refresh via localStorage
  • Works correctly in both dark and light modes

Screenshots

[Add before/after screenshots here]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Empty Colors Section in Theme Switcher

1 participant